const { http } = uni.$u

// 公用上传
export const uploadFile = (params,config = {}) => http.post('/addons/bjjb/api.common/upload',params,config);

// 是否已经是登陆用户
export const userLoginApi = (params, config = {}) => http.post('/addons/bjjb/api.login/mpWeixinLogin', params, config)

// 注册用户
export const mpWeixinRegisterAndLogin = (params, config = {}) => http.post('/addons/bjjb/api.login/mpWeixinRegisterByProfileAndLogin', params, config)

// 未注册时得到电话
export const getPhoneNumber = (params, config = {}) => http.post('/addons/bjjb/api.login/mpWeixinGetPhone', params, config)

// 注册后获取电话
export const registerGetPhone = (params, config = {}) => http.post('/addons/bjjb/api.vendor/mpWeixinDecodePhone',params,config)

// 退出
export const logout = (params, config = {}) => http.post('/addons/bjjb/api.vendor/logout', params, config)

// 获取杂项信息
export const getMiscInfo = (params, config = {}) => http.get('/addons/bjjb/api.common/misc', params, config)


// 获取企业信息
export const getUserInfo = (params, config = {}) => http.get('/addons/bjjb/api.vendor/getVendorInfo', params, config)

// 获取企业投标次数等数据
export const getMyData = (params, config = {}) => http.get('/addons/bjjb/api.vendor/myInfo', params, config)

// 更新企业基本信息
export const updateBaseInfo = (params, config = {}) => http.post('/addons/bjjb/api.vendor/updateBaseInfo', params, config)

// 更新企业发票信息
export const updateInvoiceInfo = (params, config = {}) => http.post('/addons/bjjb/api.vendor/updateInvoiceInfo', params, config)

// 更新企业银行信息
export const updateBankInfo = (params, config = {}) => http.post('/addons/bjjb/api.vendor/updateBankInfo', params, config)

export const updateContactInfo = (params, config = {}) => http.post('/addons/bjjb/api.vendor/updateContactInfo', params, config)

export const updateLicenseInfo = (params, config = {}) => http.post('/addons/bjjb/api.vendor/updateLicenseInfo', params, config)

export const updateOtherInfo = (params, config = {}) => http.post('/addons/bjjb/api.vendor/updateOtherInfo', params, config)